#include <windows.h>

bool TcpClientInitialize();
void TcpClientFinalize();

HMODULE	g_hImapLibDll = NULL;

BOOL WINAPI DllMain(HANDLE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
{
	switch (dwReason)
	{
	case DLL_PROCESS_ATTACH:
		{
			if (!TcpClientInitialize())
				return FALSE;
		}
		break;
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
		break;
	case DLL_PROCESS_DETACH:
		{
			TcpClientFinalize();
		}
		break;
	}

	g_hImapLibDll = (HMODULE)hinstDLL;

	return TRUE;
}